<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
	</head>
	<body>
		<iframe id="baidu" frameborder="0" src="https://www.baidu.com"></iframe>
		<script type="text/javascript" >
			//获得iframe节点
			const iframe = document.getElementById('baidu')
			console.log(iframe.contentWindow.document.getElementById('kw'))
			iframe.contentWindow.document.getElementById('kw').onchange = ()=>{
				console.log('@@')
			}
		</script>
	</body>
</html>